package com.apes.auto.produt.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.apes.framework.jpa.ApesBean;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.util.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @ClassName OriginalFactoryGoods
 * @Description 原厂商品
 * @Author pengyb
 * @Date 2019/8/5 11:21
 * @Version 1.0
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = JekunautoProdut.CONST_TABLE_NAME)
public class JekunautoProdut implements ApesBean {
    public static final String CONST_TABLE_NAME = "SPXX_JQCB";

    @Id
    @Column(name = "PJMC", length = 128)
    @Comment("配件名称")
    private String PJMC;

    @Column(name = "PJMCID", length = 32)
    @Comment("配件名称编码")
    private String PJMCID;

    @Column(name = "SPID", length = 32)
    @Comment("商品id")
    private String SPID;

    @Column(name = "SPMC")
    @Comment("商品名称")
    private String SPMC;

    @Column(name = "PLMC", length = 8)
    @Comment("品类名称")
    private String PLMC;

    @Column(name = "PPID" ,length = 8)
    @Comment("品牌编码")
    private String PPID;

    @Column(name = "PPMC")
    @Comment("品牌名称")
    private String PPMC;

    @Column(name = "CJID", length = 16)
    @Comment("厂家编码")
    private String CJID;

    @Column(name = "CJMC")
    @Comment("厂家名称")
    private String CJMC;

    @Column(name = "SPZID", length = 16)
    @Comment("商品组编码")
    private String SPZID;

    @Column(name = "SPZMC", length = 32)
    @Comment("商品组名称")
    private String SPZMC;

    @NotNull
    @Column(name = "SPZT", columnDefinition = "number(2) default 0")
    @Comment("商品状态(0:正常;1:预警下市;2:下市;3:停用;4:停产)")
    private int SPZT;

    @Column(name = "SPXH", length = 64)
    @Comment("商品型号")
    private String SPXH;

    @Column(name = "GG")
    @Comment("规格")
    private String GG;

    @Column(name = "BZSM")
    @Comment("包装说明")
    private String BZSM;

    @Column(name = "CD")
    @Comment("产地")
    private String CD;

    @Column(name = "EANID", length = 32)
    @Comment("条形码【EAN】")
    private String EANID;

    @Column(name = "OEMID", length = 64)
    @Comment("OEM码")
    private String OEMID;

    @Column(name = "IAMID", length = 32)
    @Comment("IAM码")
    private String IAMID;

    @Column(name = "YS", length = 32)
    @Comment("颜色")
    private String YS;

    @Column(name = "TS01", length = 36)
    @Comment("时间戳")
    private String TS01;

    @Column(name = "LRR", length = 64)
    @Comment("录入人")
    private String LRR;

    @JSONField(format = DateUtil.SHOW_DATE_FORMAT)
    @Temporal(TemporalType.DATE)
    @Column(name = "LRRQ_SJ")
    @Comment("录入日期")
    private Date LRRQ_SJ; //录入日期

    @NotNull
    @Column(name = "CGZID", length = 16)
    @Comment("采购组编码")
    private String CGZID;

    @NotNull
    @Column(name = "CGZMC")
    @Comment("采购组名称")
    private String CGZMC;

    @NotNull
    @Column(name = "SSLBID", length = 4)
    @Comment("税收类别编码")
    private String SSLBID;

    @Column(name = "SSLBMC", length = 32)
    @Comment("税收类别名称")
    private String SSLBMC;

    @NotNull
    @Column(name = "SB", columnDefinition = "number(2) default 0")
    @Comment("税别（0：增值税；1：营业税）")
    private int SB;

    @NotNull
    @Column(name = "SSBL", columnDefinition = "number(8,4) default 0")
    @Comment("税率")
    private int SSBL;

    @Column(name = "JSPID")
    @Comment("老系统商品编码")
    private String JSPID;


    @Column(name = "DSFSPID")
    @Comment("第三方商品编码")
    private String DSFSPID;

    @Column(name = "FFBJ", columnDefinition = "number(16)")
    @Comment("发放标记")
    private String FFBJ;

    @Column(name = "PLID", length = 16)
    @Comment("品类编码")
    private String PLID;

    @Column(name = "DMCJ", columnDefinition = "number(8) default 0")
    @Comment("堆码层级")
    private int DMCJ;

    @Column(name = "BZQX", columnDefinition = "number(8) default 0")
    @Comment("保质期【天】")
    private int BZQX;

    @Column(name = "BXQX", columnDefinition = "number(8) default 0")
    @Comment("保修期【天】")
    private int BXQX;

    @NotNull
    @Column(name = "SGFS", columnDefinition = "number(2) default 1")
    @Comment("施工方式(0:不施工;1:施工)")
    private int SGFS;

    @NotNull
    @Column(name = "SPZCLX", columnDefinition = "number(2) default 0")
    @Comment("制造类型（0:正常;1:OEM;2:ODM）")
    private int SPZCLX;


    @NotNull
    @Column(name = "JEHSBJ", columnDefinition = "number(2) default 1")
    @Comment("批次成本核算")
    private int JEHSBJ;

    @NotNull
    @Column(name = "SLHSBJ", columnDefinition = "number(2) default 1")
    @Comment("库存数量核算")
    private int SLHSBJ;

    @NotNull
    @Column(name = "FWSPBJ", columnDefinition = "number(2) default 0")
    @Comment("服务商品")
    private int FWSPBJ;

    @NotNull
    @Column(name = "XZWZBJ", columnDefinition = "number(2) default 0")
    @Comment("行政物资")
    private int XZWZBJ;

    @NotNull
    @Column(name = "CXZKBJ", columnDefinition = "number(2) default 0")
    @Comment("促销折扣商品")
    private int CXZKBJ;

    @Column(name = "PYM", length = 64)
    @Comment("拼音码")
    private String PYM;


    @Column(name = "FWLXID", length = 8)
    @Comment("服务类型编码")
    private String FWLXID;


    @Column(name = "FWLXMC")
    @Comment("服务类型名称")
    private String FWLXMC;

    @NotNull
    @Column(name = "KZZCBJ", columnDefinition = "number(2) default 0")
    @Comment("可转资产")
    private int KZZCBJ;


    @Column(name = "CPMS", columnDefinition = "VARCHAR2(255) default 0")
    @Comment("产品描述")
    private String CPMS;


    @NotNull
    @Column(name = "BZQBJ", columnDefinition = "number(2) default 0")
    @Comment("保质期管理")
    private int BZQBJ;

    @NotNull
    @Column(name = "KSFWBJ", columnDefinition = "number(2) default 0")
    @Comment("快速服务标记")
    private int KSFWBJ;

    @NotNull
    @Column(name = "VIPYELX", columnDefinition = "number(2) default 0")
    @Comment("会员余额类型(0:非会员余额商品;1:积分;2:储值;3:返现;4:红包)")
    private int VIPYELX;

    @NotNull
    @Column(name = "MFHCBJ", columnDefinition = "number(2) default 0")
    @Comment("免费耗材")
    private int MFHCBJ;

    @NotNull
    @Column(name = "JJHSBJ", columnDefinition = "number(2) default 0")
    @Comment("旧件需回收")
    private int JJHSBJ;

    @Column(name = "VIPHBBJ", columnDefinition = "number(2) default 0")
    @Comment("会员红包")
    private int VIPHBBJ;

    @Column(name = "ID2", columnDefinition = "number(5)")
    @Comment("自定义ID")
    private int ID2;
    @Column(name = "ZDYBJ", columnDefinition = "number(5) default 3")
    @Comment("自定义标记")
    private int ZDYBJ;
}
